import { getUserId, setUserId } from "@/utils";
import { defineStore } from "pinia";

const useUserStore = defineStore('user', {
    state: () => ({
      userId: getUserId() || '',
    }),
    actions: {
      setUserId(userId: string) {
        this.userId = userId;
        setUserId(userId);
      }
    }
})

export default useUserStore